import { herinRequist } from "../http.js";
// 绩效管理
const Performance = {
	postPerformance(data) {
		return herinRequist({ url: '/app/performance-save', method: 'POST', data ,contentType:'application/json'});
	},
	getSaveList(data) {
		return herinRequist({ url: '/app/performance-save-list', method: 'GET', data });
	},
	getHistory(data) {
		return herinRequist({ url: '/app/performance-history', method: 'GET', data });
	},
	postSaveDelete(assess_detail_id) {
		return herinRequist({ url: '/app/performance-save-delete', method: 'POST', data: { assess_detail_id } ,contentType:'application/json' });
	},
	postSaveDetail(data) {
		return herinRequist({ url: '/app/performance-save-detail', method: 'POST', data });
	},
	postSelfPerformance(id) {
		return herinRequist({ url: '/app/self-performance', method: 'POST', data: { id } ,contentType:'application/json'});
	},
	postAudit(data) {
		return herinRequist({ url: '/app/performance-audit', method: 'POST', data ,contentType:'application/json' });
	},
	postCancel(id) {
		return herinRequist({ url: '/app/performance-cancel', method: 'POST',  data: { id } ,contentType:'application/json' });
	},
	getStatistical(time) {
		return herinRequist({ url: '/app/work-target-state', method: 'GET',data:{time} ,contentType:'application/json'});
	},
	getDetail(id) {
		return herinRequist({ url: '/app/preformance-detail', method: 'GET', data: { id }  });
	},
	// 修改保存接口
	getPerformanceUpdate(data) {
		return herinRequist({ url: '/app/performance-update', method: 'POST', data ,contentType:'application/json' });
	},
	// 获取个人填报指标接口
	getThirdOther(assess_detail_id) {
		return herinRequist({ url: '/app/performance-person-third-other', method: 'GET', data: { assess_detail_id }  });
	},
	// 工作指标tree
	getWorkThird() {
		return herinRequist({ url: '/app/performance-work-third', method: 'GET',});
	},
	// 偶发性指标性质
	getNatureThird() {
		return herinRequist({ url: '/app/performance-nature-third', method: 'GET',});
	},
	// 获取绩效折线图
	getPerformanceTrend(){
		return herinRequist({ url: '/app/performance-trend', method: 'GET',});
	},
	// 
	getDetailThird(assess_detail_id) {
		return herinRequist({ url: '/app/performance-person-third', method: 'GET', data: { assess_detail_id } ,contentType:'application/json'});
	},
	// 审核确定接口
	getPerformanceEnsure(data) {
		return herinRequist({ url: '/app/performance-ensure', method: 'POST', data ,contentType:'application/json'});
	},
	// 复审退回接口
	getPerformanceBack(data) {
		return herinRequist({ url: '/app/performance-back', method: 'POST', data,contentType:'application/json'});
	},
	// 复审退回提交接口
	postBackApply(data) {
		return herinRequist({ url: '/app/performance-back-apply', method: 'POST', data,contentType:'application/json'});
	},
};

export default Performance;
